<?php
header("Content-type: text/xml");
echo ("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
$server = str_replace('www', '', $_SERVER["SERVER_NAME"]);
$date = gmdate('Y-m-d', time() - 60*60*24*1);
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <url><loc>http://<?=$server?>/</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq><priority>1.0</priority></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;title_type=tv_series</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=action</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=animation</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=drama</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=adventure</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=biography</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=comedy</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=crime</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=documentary</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=family</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=fantasy</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=film_noir</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=game_show</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=history</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=horror</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=music</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=musical</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=mystery</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=news</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=reality_tv</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=romance</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=sci_fi</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=sport</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=talk_show</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=thriller</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=war</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
    <url><loc>http://<?=$server?>/?tpsearch=1&amp;genres=western</loc><lastmod><?=$date?></lastmod><changefreq>daily</changefreq></url>
</urlset>

